<!-- Portfolio Grid Section -->
<section id="portfolio" class="bg-light-gray" style="margin-top:-110px;">
    <div class="container">

             <div class="row">
                <div class="col-lg-12 text-center">
                    <h2 class="section-heading"> Notes </h2>
                </div>
                
                <div class="col-lg-12 text-center">
                    <center>
                        <div class="input-group" >
                                <input id="search_q" name="search" class="form-control" placeholder="Search" style="width:70%">
                                <select id="sel" class="form-control" style="margin-top:-34px; margin-left:70%;width:30%;" >
                                    <option>Ads</option>
                                    <option>Notes</option>
                                    <option>Users</option>
                                </select>    
                                <button id="search_btn"  onclick="search_rout('<?=base_url()?>')" style="margin-left:99%; margin-top:-57px;" class="btn btn-primary"><i class="fa fa-search"></i></button>
                                <br><br>
                        </div>

                        <br>
                        <div class="row">
                            <div class="panel panel-default">
                                <div class="panel-body">
                                    <div class="col-md-2">
                                        <h4>Sort by: </h4>
                                    </div>
                                    <div class="col-md-4">                                    
                                            <select class="form-control" id="sort_by">
                                                <option value="downloads">Download</option>
                                                <option value="semester">Semester</option>  
                                                <option value="faculty">Faculty</option> 
                                                <option value="note_title">Alphabetical</option> 
                                            </select>
                                    </div>

                                     <div class="col-md-2">
                                        <select class="form-control" id="sort_order">
                                            <option value="asc">&uarr; &nbsp;Ascending</option>
                                            <option value="desc">&darr; &nbsp;Descending</option>    
                                        </select>   
                                    </div>

                                    <div class="col-md-2">
                                        <button onclick="sort_notes('<?php echo base_url(); ?>')" class="btn btn-primary">SORT</button>
                                    </div>
                                </div>
                             </div>   
                        </div>                      
                    </center>
                    <br>
                </div>
            </div>




     <?php $endl = 1;
            $id = 0;
      ?>       
        
            <?php foreach($records as $row) {
                   if($endl%4==0)
                   echo "<div class='row'>"; 
             ?>
                <div class="col-md-3 col-sm-4 portfolio-item">
                    <a href="<?php echo base_url(); ?>members/notes_detail/<?php echo $row->notes_id ?>"class="portfolio-link" data-toggle="modal">
                        <div class="portfolio-hover">
                            <div class="portfolio-hover-content">
                                <i class="fa fa-plus fa-3x"></i>
                            </div>
                        </div>
                        <img src="<?=base_url()?>/Assets/img/note-img.png" class="img-responsive" alt=""  >
                    </a>
                 <div class="portfolio-caption">
                        <h4><?php echo $row->note_title; ?></h4>
                         <p class="text-muted"> semester: <?php echo $row->semester; ?> </p>
                        <p class="text-muted">Teacher: <?php echo $row->author; ?> </p>
                    </div>
                </div>





            <?php
            if($endl % 4 ==0)
                echo "</div>";

            $endl++;
            $id++; 

             }
              

              ?> 
  



        <div class="row">
            <div class="col-md-12">
                <center>
                    <?php echo $this->pagination->create_links(); ?>
                </center>
            </div>
        </div>

    </div>
</section>




    


                    

